#! /bin/bash
if [ ! -f "./host.sh" -o ! -f "./directory.sh" -o ! -f "./ftp.sh" -o ! -f "./useradd.sh" -o ! -f "./ping.sh" -o ! -f "./tcp_wrapper.sh" ]; then
  echo -e '\033[31m[ERROR] Missing shell files!\033[0m'
  exit
fi
while((1))
do
  clear
  echo -e "\033[32m[NOTE] Please enter <quit> to return to the main menu.\033[0m"
  echo
  read -p "Please enter a directory path: " dir
  if [ $dir == 'quit' ]; then echo -e "\033[32mReturn main menu...\033[0m" exit; fi
  read -p "Please enter the smallest size of subdirectory: " minSize
  if [ $minSize == 'quit' ]; then echo -e "\033[32mReturn main menu...\033[0m" exit; fi
  echo -e "\033[32mThe list of subdirectory size geater $minSize :\033[0m"
  find $dir -maxdepth 1 -size +$minSizec -type d
  read sure
  if [ $sure == 'quit' ]; then echo -e "\033[32mReturn main menu...\033[0m" exit; fi
done